<?php
@header('Content-Type: text/html; charset=utf-8');
@date_default_timezone_set('Asia/Shanghai');

$agi_start_time = microtime();

# AGI_RUN_MODE	框架运行模式 0:开发模式,1:运行模式 
define('AGI_RUN_MODE',		0);
# AGI_ROOT		框架及网站根目录	*
# AGI_LIB		框架基础类库目录	*
# AGI_APP		网站应用目录		*
define('AGI_ROOT', 			dirname(__FILE__));
define('AGI_LIB', 			AGI_ROOT	. '/lib');
define('AGI_APP', 			AGI_ROOT	. '/app');
define('AGI_CONF',			AGI_APP		. '/config');
# AGI_APP_C		Controller目录		*
# AGI_APP_M		Molde目录			*
# AGI_APP_V		View目录			*
# AGI_APP_L		Layout目录			*
define('AGI_APP_C', 		AGI_APP		. '/controller');
define('AGI_APP_M', 		AGI_APP		. '/model');
define('AGI_APP_V', 		AGI_APP		. '/view');
define('AGI_APP_L', 		AGI_APP_V	. '/layout');
# SITE_CONF			网站配置		*
# SITE_DB_CONF		数据库配置		*
# SITE_ROUTE		路径映射配置	*
# SITE_LANG_PACK	网站语言包		*

require AGI_CONF	. '/route.php';
require AGI_LIB		. '/AGI.Base.php';

function runtime() {
	global $agi_start_time;
	$f_s_time = explode(' ', $agi_start_time);
	$f_s_time = $f_s_time[0] + $f_s_time[1];
	$f_e_time = explode(' ', microtime());
	$f_e_time = $f_e_time[0] + $f_e_time[1];
	return $f_e_time - $f_s_time;
}

Response::instance();
echo '<br />' . Response::memory() . '<br />';
echo runtime() . '<br />';
?>
